package a.f.d.a;

import a.a.h;
import a.a.qb;
import a.c.e;
import a.c.q;
import a.c.v;
import a.c.w;
import a.c.z;
import a.f.o;
import a.i.wb;

import java.util.ArrayList;
import java.util.Arrays;
import java.util.Comparator;
import java.util.Random;

public class t
  implements tc
{
  private int a = 50;
  private boolean b = true;
  private boolean c = false;
  private Comparator d;
  private long e = 10000L;
  private byte f = 0;
  private float[] g;
  private float[] h;
  private e[] i;
  private int[] j;
  private int[] k;
  private v[] l;
  private z m;
  private z n;
  private z o;
  private z p;
  private byte[] q;
  private byte[] r;
  private int[] s;
  private int[] t;
  static final byte u = -1;
  static final byte v = 0;
  static final byte w = 1;
  static final byte x = -2;
  private Comparator y;
  private Comparator z;
  private Comparator A;
  private Comparator B;
  private Comparator C;
  private Comparator D;
  private o E;
  private z[] F;
  private int[] G;
  private int[] H;
  int[] I;
  int[] J;
  Comparator K;
  private m L;
  private hb M;
  private ec[] N;
  public static final byte O = 0;
  public static final byte P = 1;
  private static final int Q = 0;
  private static final int R = 1;
  private static final int S = 2;
  final int[] T = new int[4];
  private static final byte U = 3;
  private static final byte V = 1;
  private static final byte W = 2;
  private static final byte X = 4;
  public static boolean Y;
  
  public void a(boolean paramBoolean)
  {
    this.b = paramBoolean;
  }
  
  public boolean a()
  {
    return this.b;
  }
  
  public void b(boolean paramBoolean)
  {
    this.c = paramBoolean;
  }
  
  public boolean b()
  {
    return this.c;
  }
  
  public void a(byte paramByte)
  {
    if (((d.R) || (paramByte != 0)) && (paramByte != 1)) {
      throw new IllegalArgumentException();
    }
    this.f = paramByte;
  }
  
  public byte c()
  {
    return this.f;
  }
  
  public long d()
  {
    return this.e;
  }
  
  public int e()
  {
    return this.a;
  }
  
  public void a(int paramInt)
  {
    this.a = paramInt;
  }
  
  public void a(long paramLong)
  {
    this.e = paramLong;
  }
  
  private cc a(o paramo, ac paramac, bc parambc, int[] paramArrayOfInt1, int[] paramArrayOfInt2)
  {
    this.q = new byte[paramo.m()];
    this.s = new int[paramo.m()];
    this.r = new byte[paramo.m()];
    this.t = new int[paramo.m()];
    return cc.a(paramo, paramac, parambc, paramArrayOfInt2, paramArrayOfInt1, this.q, this.s, this.r, this.t, (byte)1, (byte)0);
  }
  
  private cc b(o paramo, ac paramac, bc parambc, int[] paramArrayOfInt1, int[] paramArrayOfInt2)
  {
    boolean bool = d.Q;
    cc localcc = a(paramo, paramac, parambc, paramArrayOfInt1, paramArrayOfInt2);
    a.c.m localm = paramo.w();
    do
    {
      if (!localm.e()) {
        break;
      }
      a.c.d locald = localm.a();
      a(locald, this.q, this.r, paramArrayOfInt2);
      a(locald, this.r, this.q, paramArrayOfInt2);
      localm.f();
    } while (!bool);
    return localcc;
  }
  
  private static void a(a.c.d paramd, byte[] paramArrayOfByte1, byte[] paramArrayOfByte2, int[] paramArrayOfInt)
  {
    boolean bool = d.R;
    int i1 = paramd.d();
    if (!bool) {
      if (Math.abs(paramArrayOfByte1[i1]) != 1) {
        return;
      }
    }
    if (paramArrayOfInt[paramd.f().f()] < 0)
    {
      if (!bool) {}
      a.c.d locald = paramd.j() == null ? paramd.l() : paramd.j();
      int i2 = locald.d();
      if (!bool)
      {
        if (paramArrayOfByte2[i2] == -2)
        {
          paramArrayOfByte2[i1] = ((byte)-paramArrayOfByte1[i1]);
          paramArrayOfByte2[i2] = paramArrayOfByte1[i1];
        }
      }
      else {
        paramArrayOfByte1[i2] = ((byte)-paramArrayOfByte1[i1]);
      }
    }
  }
  
  private void a(q paramq, wb paramwb)
  {
    boolean bool2 = d.R;
    boolean bool1 = d.Q;
    w localw = paramq.v();
    if (localw.e())
    {
      this.g[localw.d().f()] = paramwb.nextInt();
      localw.f();
    }
    for (;;)
    {
      if ((bool2) || (!bool1))
      {
        if (!bool1) {
          break;
        }
        if (!bool2) {
          paramq.a(new Comparator()new Comparator
          {
            public int compare(Object paramAnonymousObject1, Object paramAnonymousObject2)
            {
              return l.a((int)t.this.g[((a.c.d)paramAnonymousObject1).e().f()], (int)t.this.g[((a.c.d)paramAnonymousObject2).e().f()]);
            }
          }, new Comparator()
          {
            public int compare(Object paramAnonymousObject1, Object paramAnonymousObject2)
            {
              return l.a((int)t.this.g[((a.c.d)paramAnonymousObject1).f().f()], (int)t.this.g[((a.c.d)paramAnonymousObject2).f().f()]);
            }
          });
        }
      }
    }
  }
  
  private int f()
  {
    boolean bool2 = d.R;
    boolean bool1 = d.Q;
    a(this.E, this.C, this.D);
    int i1 = 0;
    do
    {
      int i2 = this.F.length - 1;
      while (!bool1)
      {
        if (i2 <= 0) {
          break;
        }
        if (!bool2)
        {
          if (bool1) {
            break label82;
          }
          i1 += a(this.F[(i2 - 1)], this.F[i2]);
          i2--;
        }
      }
    } while (bool2);
    label82:
    return i1;
  }
  
  private int a(z paramz1, z paramz2)
  {
    boolean bool2 = d.R;
    boolean bool1 = d.Q;
    v localv1 = paramz1.f();
    v localv2 = paramz2.f();
    this.m.clear();
    this.n.clear();
    this.o.clear();
    this.p.clear();
    int i1 = 0;
    do
    {
      if (localv1 == null) {
        break;
      }
      if (bool1) {
        break label146;
      }
      if (localv2 == null) {
        break;
      }
      i1 += a((e)localv1.c(), this.m, this.o, this.n);
      i1 += b((e)localv2.c(), this.n, this.p, this.m);
      localv1 = localv1.a();
      localv2 = localv2.a();
    } while (!bool1);
    label146:
    label181:
    do
    {
      if ((bool2) || (localv1 == null)) {
        break;
      }
      i1 += a((e)localv1.c(), this.m, this.o, this.n);
      localv1 = localv1.a();;
      if ((!bool2) && (bool1)) {
        break label258;
      }
    } while (!bool1);
    label253:
    while (bool2)
    {
      break label253;
      if (bool2) {
        break label181;
      }
      if (localv2 != null)
      {
        if (!bool2)
        {
          if (bool1) {
            break label265;
          }
          i1 += b((e)localv2.c(), this.n, this.p, this.m);
          localv2 = localv2.a();
        }
        if (!bool1) {
          break;
        }
      }
    }
    label258:
    label265:
    return i1;
  }
  
  private int a(e parame, z paramz1, z paramz2, z paramz3)
  {
    boolean bool2 = d.R;
    boolean bool1 = d.Q;
    int i1 = this.H[parame.f()];
    int i2 = this.T[0] = this.T[1] = this.T[2] = this.T[3] = 0;
    a.c.d locald1 = parame.h();
    label193:
    label213:
    label613:
    label620:
    label622:
    do
    {
      if (locald1 == null) {
        break;
      }
      int i3;
      v localv1 = this.l[(i3 = locald1.d())];
      Object localObject;
      v localv2;
      if (localv1.c() == null)
      {
        if (!bool2) {
          if (this.G[locald1.f().f()] < 0)
          {
            if (!bool2) {}
            localObject = locald1.j() == null ? locald1.l() : locald1.j();
            localv2 = this.l[localObject.d()];
            paramz2.a(localv2);
            localv2.a(localObject);
            if (bool2) {
              break label213;
            }
            if (!bool1) {
              break label193;
            }
          }
        }
        i2 += paramz2.size();
        paramz3.a(localv1);
        localv1.a(locald1);
        this.T[(this.q[i3] + 2)] += 1;
        if ((!bool2) && (!bool1)) {}
      }
      else
      {
        if (!bool2)
        {
          if (this.G[locald1.f().f()] < 0)
          {
            paramz2.h(localv1);
            localv1.a(null);
            localObject = localv1.a();
            do
            {
              if (localObject == null) {
                break;
              }
              i2++;
              localObject = ((v)localObject).a();
              if (bool2) {
                break label622;
              }
              if (bool1) {
                break label620;
              }
            } while (!bool1);
          }
          paramz1.h(localv1);
          localv1.a(null);
        }
        int i4 = this.s[i3];
        if (bool2) {
          continue;
        }
        if (!bool2) {
          if (i4 > 0)
          {
            localv2 = localv1.b();
            if (localv2 != null)
            {
              i2++;
              localv2 = localv2.b();
            }
            for (;;)
            {
              if (!bool2) {
                if (!bool1)
                {
                  if (!bool1) {
                    break;
                  }
                  i2 += paramz3.size();
                  if (bool2) {
                    continue;
                  }
                  i2 += paramz2.size();
                }
              }
            }
            if ((!bool2) && (!bool1)) {
              break label613;
            }
          }
        }
        int i5 = this.q[i3];
        v localv3 = localv1.b();
        do
        {
          if (localv3 == null) {
            break;
          }
          a.c.d locald2;
          if (bool2) {
            break label527;
          }
          if (bool1) {
            break label522;
          }
          if (this.H[(locald2 = (a.c.d)localv3.c()).e().f()] <= i1)
          {
            if (bool2) {
              continue;
            }
            if (i5 != -2)
            {
              if (bool2) {
                continue;
              }
              if (this.q[locald2.d()] <= i5) {}
            }
          }
          else
          {
            i2++;
          }
          localv3 = localv3.b();
        } while (!bool1);
        if (!bool2) {}
        i2 += paramz3.size() + paramz2.size();
        if (!bool2) {}
        switch (i5)
        {
        case -1: 
          i2 -= this.T[1];
          if (!bool2) {
            if (!bool1) {
              break label613;
            }
          }
        case 0: 
          i2 -= this.T[2];
          if ((!bool2) && (!bool1)) {}
          break;
        case 1: 
          i2 -= this.T[3];
        }
      }
      locald1 = locald1.i();
    } while (!bool1);
    label522:
    label527:
    return i2;
  }
  
  private int b(e parame, z paramz1, z paramz2, z paramz3)
  {
    boolean bool2 = d.R;
    boolean bool1 = d.Q;
    int i1 = this.H[parame.f()];
    int i2 = this.T[0] = this.T[1] = this.T[2] = this.T[3] = 0;
    a.c.d locald1 = parame.i();
    label193:
    label213:
    label609:
    label616:
    label618:
    do
    {
      if (locald1 == null) {
        break;
      }
      int i3;
      v localv1 = this.l[(i3 = locald1.d())];
      Object localObject;
      v localv2;
      if (localv1.c() == null)
      {
        if (!bool2) {
          if (this.G[locald1.e().f()] < 0)
          {
            if (!bool2) {}
            localObject = locald1.i() == null ? locald1.k() : locald1.i();
            localv2 = this.l[localObject.d()];
            paramz2.a(localv2);
            localv2.a(localObject);
            if (bool2) {
              break label213;
            }
            if (!bool1) {
              break label193;
            }
          }
        }
        i2 += paramz2.size();
        paramz3.a(localv1);
        localv1.a(locald1);
        this.T[(this.r[i3] + 2)] += 1;
        if ((!bool2) && (!bool1)) {}
      }
      else
      {
        if (!bool2)
        {
          if (this.G[locald1.e().f()] < 0)
          {
            paramz2.h(localv1);
            localv1.a(null);
            localObject = localv1.a();
            do
            {
              if (localObject == null) {
                break;
              }
              i2++;
              localObject = ((v)localObject).a();
              if (bool2) {
                break label618;
              }
              if (bool1) {
                break label616;
              }
            } while (!bool1);
          }
          paramz1.h(localv1);
          localv1.a(null);
        }
        int i4 = this.t[i3];
        if (bool2) {
          continue;
        }
        if (!bool2) {
          if (i4 > 0)
          {
            localv2 = localv1.b();
            if (localv2 != null)
            {
              i2++;
              localv2 = localv2.b();
            }
            for (;;)
            {
              if (!bool2) {
                if (!bool1)
                {
                  if (!bool1) {
                    break;
                  }
                  if (bool2) {
                    continue;
                  }
                  i2 += paramz3.size() + paramz2.size();
                }
              }
            }
            if ((!bool2) && (!bool1)) {
              break label609;
            }
          }
        }
        int i5 = this.r[i3];
        v localv3 = localv1.b();
        do
        {
          if (localv3 == null) {
            break;
          }
          a.c.d locald2;
          if (bool2) {
            break label523;
          }
          if (bool1) {
            break label518;
          }
          if (this.H[(locald2 = (a.c.d)localv3.c()).f().f()] <= i1)
          {
            if (bool2) {
              continue;
            }
            if (i5 != -2)
            {
              if (bool2) {
                continue;
              }
              if (this.r[locald2.d()] <= i5) {}
            }
          }
          else
          {
            i2++;
          }
          localv3 = localv3.b();
        } while (!bool1);
        if (!bool2) {}
        i2 += paramz3.size() + paramz2.size();
        if (!bool2) {}
        switch (i5)
        {
        case -1: 
          i2 -= this.T[1];
          if (!bool2) {
            if (!bool1) {
              break label609;
            }
          }
        case 0: 
          i2 -= this.T[2];
          if ((!bool2) && (!bool1)) {}
          break;
        case 1: 
          i2 -= this.T[3];
        }
      }
      locald1 = locald1.j();
    } while (!bool1);
    label518:
    label523:
    return i2;
  }
  
  private byte a(int[] paramArrayOfInt)
  {
    return a(0, this.F.length - 1, paramArrayOfInt);
  }
  
  private byte a(int paramInt1, int paramInt2, int[] paramArrayOfInt)
  {
    boolean bool2 = d.R;
    boolean bool1 = d.Q;
    byte b1 = 0;
    int i3;
    z localz;
    byte b2;
    if (!bool2) {
      if (paramInt1 <= paramInt2)
      {
        i1 = 1;
        i2 = 20;
        do
        {
          do
          {
            if (i1 == 0) {
              break;
            }
            i2--;
            if (!bool2)
            {
              if (i2 <= 0) {
                break;
              }
              i1 = 0;
            }
            i3 = paramInt1;
            do
            {
              if (i3 > paramInt2) {
                break;
              }
              localz = this.F[i3];
              a(localz, this.B, this.A);
              b2 = a(localz, true, true, paramArrayOfInt);
            } while (bool2);
          } while (bool1);
          if (bool1) {
            break label262;
          }
          i1 = (b2 & 0x4) != 0 ? 1 : 0;
          b1 = (byte)(b1 | b2);
          i3++;
        } while (!bool1);
      }
    }
    int i1 = 1;
    int i2 = 20;
    break label170;
    if (i1 != 0) {
      label148:
      i2--;
    }
    label170:
    while (bool2) {
      if (!bool2)
      {
        if (i2 > 0) {
          i1 = 0;
        }
      }
      else
      {
        i3 = paramInt1;
        do
        {
          if (i3 < paramInt2) {
            break;
          }
          localz = this.F[i3];
          a(localz, this.B, this.A);
          b2 = a(localz, true, true, paramArrayOfInt);
        } while (bool2);
        if (bool1) {
          break label148;
        }
        if (bool1) {
          break label262;
        }
        i1 = (b2 & 0x4) != 0 ? 1 : 0;
        b1 = (byte)(b1 | b2);
        i3--;
        if (!bool1) {
          break;
        }
      }
    }
    label262:
    return b1;
  }
  
  private byte a(z paramz, boolean paramBoolean1, boolean paramBoolean2, int[] paramArrayOfInt)
  {
    int i1 = b(paramz, paramBoolean1, paramBoolean2, paramArrayOfInt);
    int i2 = c(paramz, paramBoolean1, paramBoolean2, paramArrayOfInt);
    return (byte)(i1 | i2);
  }
  
  private byte b(z paramz, boolean paramBoolean1, boolean paramBoolean2, int[] paramArrayOfInt)
  {
    boolean bool2 = d.R;
    boolean bool1 = d.Q;
    int i1 = 0;
    int i2 = 0;
    int i3 = 0;
    v localv1 = paramz.f();
    int i4 = 0;
    label186:
    label193:
    label373:
    label888:
    do
    {
      do
      {
        if (i4 >= paramz.size() - 1) {
          break;
        }
        v localv2 = localv1;
        localv1 = localv2.a();
        e locale1 = (e)localv2.c();
        e locale2 = (e)localv1.c();
        if (bool1) {
          break label984;
        }
        if (!bool2) {
          if (this.L != null)
          {
            if (bool2) {
              break label193;
            }
            if (!this.L.a(this.E, locale1, locale2)) {
              break label186;
            }
            break label957;
          }
        }
        if (!bool2) {
          if (this.I != null)
          {
            i5 = this.I[locale1.f()];
            i6 = this.I[locale2.f()];
            if ((!bool2) && ((i5 >= 0) && ((!bool2) && ((i6 >= 0) && ((!bool2) && (i5 != i6)))))) {
              break label957;
            }
          }
        }
        if (!bool2) {
          if (this.M.o())
          {
            if (((!bool2) && (this.N[locale2.f()] == null)) || ((!bool2) && (this.N[locale1.f()] == null)) || ((!bool2) && (this.N[locale1.f()].a() != this.N[locale2.f()].a()))) {
              break label957;
            }
            i5 = this.N[locale1.f()].d();
            i6 = this.N[locale2.f()].d();
            if (bool2) {
              continue;
            }
            if (i5 == 12) {
              break label957;
            }
            if (bool2) {
              continue;
            }
            if (i5 == 13) {
              break label957;
            }
            if (bool2) {
              continue;
            }
            if (i6 == 12) {
              break label957;
            }
            if (bool2) {
              break label373;
            }
            if (i6 == 13) {
              break label957;
            }
          }
        }
        int i5 = 0;
        int i6 = 0;
        if (!bool2) {
          if (paramBoolean1)
          {
            i5 = d(locale1, locale2, paramArrayOfInt);
            if (!bool2) {
              if (!paramBoolean2)
              {
                if (bool2) {
                  break label425;
                }
                if (i5 <= 0) {
                  break label424;
                }
              }
            }
            i6 = d(locale2, locale1, paramArrayOfInt);
          }
        }
        if (!bool2) {
          if (paramBoolean2)
          {
            i5 += c(locale1, locale2, paramArrayOfInt);
            if (!bool2) {
              if (!paramBoolean1)
              {
                if (bool2) {
                  break label484;
                }
                if (i5 <= 0) {
                  break label482;
                }
              }
            }
            i6 += c(locale2, locale1, paramArrayOfInt);
          }
        }
        if (!bool2)
        {
          if (i5 >= i6)
          {
            if (!bool2) {
              if (i5 > i6)
              {
                i1 = 1;
                i7 = paramArrayOfInt[locale1.f()];
                paramArrayOfInt[locale1.f()] = paramArrayOfInt[locale2.f()];
                paramArrayOfInt[locale2.f()] = i7;
                localv1.a(locale1);
                localv2.a(locale2);
                if (!bool2) {
                  if (locale1.e() <= 0) {
                    if (bool2) {
                      break label588;
                    }
                  }
                }
                i2 |= (locale2.e() > 0 ? 1 : 0);
                if (!bool2) {
                  if (locale1.d() <= 0) {
                    if (bool2) {
                      break label624;
                    }
                  }
                }
                i3 |= (locale2.d() > 0 ? 1 : 0);
                a(locale1, paramBoolean1 ? this.B : null, paramBoolean2 ? this.A : null, true);
                a(locale2, paramBoolean1 ? this.B : null, paramBoolean2 ? this.A : null, false);
                if (bool2) {
                  continue;
                }
                if (!bool1) {
                  break label957;
                }
              }
            }
            int i7 = a(locale1, locale2, true, true, paramArrayOfInt);
            int i8 = a(locale2, locale1, true, true, paramArrayOfInt);
            if (!bool2) {
              if (i8 >= i7)
              {
                if (bool2) {
                  continue;
                }
                if (i8 != i7) {
                  break label957;
                }
                if (bool2) {
                  continue;
                }
                if (!paramBoolean1) {
                  break label957;
                }
                if (bool2) {
                  continue;
                }
                if (!paramBoolean2) {
                  break label957;
                }
              }
            }
            int i9 = paramArrayOfInt[locale1.f()];
            paramArrayOfInt[locale1.f()] = paramArrayOfInt[locale2.f()];
            paramArrayOfInt[locale2.f()] = i9;
            localv1.a(locale1);
            localv2.a(locale2);
            if (!bool2) {
              if (locale1.e() <= 0) {
                if (bool2) {
                  break label852;
                }
              }
            }
            i2 |= (locale2.e() > 0 ? 1 : 0);
            if (!bool2) {
              if (locale1.d() <= 0) {
                if (bool2) {
                  break label888;
                }
              }
            }
            i3 |= (locale2.d() > 0 ? 1 : 0);
            a(locale1, paramBoolean1 ? this.B : null, paramBoolean2 ? this.A : null, true);
            a(locale2, paramBoolean1 ? this.B : null, paramBoolean2 ? this.A : null, false);
          }
          i4++;
        }
      } while (!bool1);
    } while (bool2);
    label424:
    label425:
    label482:
    label484:
    label624:
    if (!bool2) {}
    label588:
    label852:
    label984:
    if (!bool2) {}
    label957:
    if (!bool2) {}
    return (byte)((i1 != 0 ? 4 : 0) | (i3 != 0 ? 2 : 0) | (i2 != 0 ? 1 : 0));
  }
  
  private byte c(z paramz, boolean paramBoolean1, boolean paramBoolean2, int[] paramArrayOfInt)
  {
    boolean bool2 = d.R;
    boolean bool1 = d.Q;
    int i1 = 0;
    int i2 = 0;
    int i3 = 0;
    v localv1 = paramz.g();
    int i4 = paramz.size() - 2;
    label185:
    label192:
    label372:
    label887:
    do
    {
      do
      {
        if (i4 < 0) {
          break;
        }
        v localv2 = localv1;
        localv1 = localv1.b();
        e locale1 = (e)localv1.c();
        e locale2 = (e)localv2.c();
        if (bool1) {
          break label983;
        }
        if (!bool2) {
          if (this.L != null)
          {
            if (bool2) {
              break label192;
            }
            if (!this.L.a(this.E, locale1, locale2)) {
              break label185;
            }
            break label956;
          }
        }
        if (!bool2) {
          if (this.I != null)
          {
            i5 = this.I[locale1.f()];
            i6 = this.I[locale2.f()];
            if ((!bool2) && ((i5 >= 0) && ((!bool2) && ((i6 >= 0) && ((!bool2) && (i5 != i6)))))) {
              break label956;
            }
          }
        }
        if (!bool2) {
          if (this.M.o())
          {
            if (((!bool2) && (this.N[locale2.f()] == null)) || ((!bool2) && (this.N[locale1.f()] == null)) || ((!bool2) && (this.N[locale2.f()].a() != this.N[locale1.f()].a()))) {
              break label956;
            }
            i5 = this.N[locale1.f()].d();
            i6 = this.N[locale2.f()].d();
            if (bool2) {
              continue;
            }
            if (i5 == 12) {
              break label956;
            }
            if (bool2) {
              continue;
            }
            if (i5 == 13) {
              break label956;
            }
            if (bool2) {
              continue;
            }
            if (i6 == 12) {
              break label956;
            }
            if (bool2) {
              break label372;
            }
            if (i6 == 13) {
              break label956;
            }
          }
        }
        int i5 = 0;
        int i6 = 0;
        if (!bool2) {
          if (paramBoolean1)
          {
            i5 = d(locale1, locale2, paramArrayOfInt);
            if (!bool2) {
              if (!paramBoolean2)
              {
                if (bool2) {
                  break label424;
                }
                if (i5 <= 0) {
                  break label423;
                }
              }
            }
            i6 = d(locale2, locale1, paramArrayOfInt);
          }
        }
        if (!bool2) {
          if (paramBoolean2)
          {
            i5 += c(locale1, locale2, paramArrayOfInt);
            if (!bool2) {
              if (!paramBoolean1)
              {
                if (bool2) {
                  break label483;
                }
                if (i5 <= 0) {
                  break label481;
                }
              }
            }
            i6 += c(locale2, locale1, paramArrayOfInt);
          }
        }
        if (!bool2)
        {
          if (i5 >= i6)
          {
            if (!bool2) {
              if (i5 > i6)
              {
                i1 = 1;
                i7 = paramArrayOfInt[locale1.f()];
                paramArrayOfInt[locale1.f()] = paramArrayOfInt[locale2.f()];
                paramArrayOfInt[locale2.f()] = i7;
                localv2.a(locale1);
                localv1.a(locale2);
                if (!bool2) {
                  if (locale1.e() <= 0) {
                    if (bool2) {
                      break label587;
                    }
                  }
                }
                i2 |= (locale2.e() > 0 ? 1 : 0);
                if (!bool2) {
                  if (locale1.d() <= 0) {
                    if (bool2) {
                      break label623;
                    }
                  }
                }
                i3 |= (locale2.d() > 0 ? 1 : 0);
                a(locale1, paramBoolean1 ? this.B : null, paramBoolean2 ? this.A : null, true);
                a(locale2, paramBoolean1 ? this.B : null, paramBoolean2 ? this.A : null, false);
                if (bool2) {
                  continue;
                }
                if (!bool1) {
                  break label956;
                }
              }
            }
            int i7 = a(locale1, locale2, true, true, paramArrayOfInt);
            int i8 = a(locale2, locale1, true, true, paramArrayOfInt);
            if (!bool2) {
              if (i8 >= i7)
              {
                if (bool2) {
                  continue;
                }
                if (i8 != i7) {
                  break label956;
                }
                if (bool2) {
                  continue;
                }
                if (!paramBoolean1) {
                  break label956;
                }
                if (bool2) {
                  continue;
                }
                if (!paramBoolean2) {
                  break label956;
                }
              }
            }
            int i9 = paramArrayOfInt[locale1.f()];
            paramArrayOfInt[locale1.f()] = paramArrayOfInt[locale2.f()];
            paramArrayOfInt[locale2.f()] = i9;
            localv2.a(locale1);
            localv1.a(locale2);
            if (!bool2) {
              if (locale1.e() <= 0) {
                if (bool2) {
                  break label851;
                }
              }
            }
            i2 |= (locale2.e() > 0 ? 1 : 0);
            if (!bool2) {
              if (locale1.d() <= 0) {
                if (bool2) {
                  break label887;
                }
              }
            }
            i3 |= (locale2.d() > 0 ? 1 : 0);
            a(locale1, paramBoolean1 ? this.B : null, paramBoolean2 ? this.A : null, true);
            a(locale2, paramBoolean1 ? this.B : null, paramBoolean2 ? this.A : null, false);
          }
          i4--;
        }
      } while (!bool1);
    } while (bool2);
    label423:
    label424:
    label481:
    label483:
    label623:
    if (!bool2) {}
    label587:
    label851:
    label983:
    if (!bool2) {}
    label956:
    if (!bool2) {}
    return (byte)((i1 != 0 ? 4 : 0) | (i3 != 0 ? 2 : 0) | (i2 != 0 ? 1 : 0));
  }
  
  private void a(e parame, Comparator paramComparator1, Comparator paramComparator2, boolean paramBoolean)
  {
    boolean bool2 = d.R;
    boolean bool1 = d.Q;
    a.c.d locald1;
    a.c.d locald2;
    if (paramBoolean)
    {
      if (!bool2)
      {
        if ((paramComparator1 != null) && ((bool2) || (parame.d() > 1)))
        {
          locald1 = parame.i();
          locald2 = parame.k();
          do
          {
            if (paramComparator1.compare(locald1, locald2) <= 0) {
              break;
            }
            if (bool1) {
              break label164;
            }
            if (locald2.i() != null)
            {
              this.E.a(locald2, locald2.i(), locald1, 1, 1);
              if (bool2) {
                continue;
              }
              if (!bool1) {}
            }
            else
            {
              this.E.a(locald2, locald2.k(), locald1, 0, 1);
            }
            locald2 = parame.k();
          } while (!bool1);
        }
        if (bool2) {
          break label245;
        }
      }
      if (paramComparator2 == null) {
        return;
      }
      if ((!bool2) && (parame.e() <= 1)) {
        return;
      }
      locald1 = parame.h();
      label164:
      locald2 = parame.j();
      do
      {
        if (paramComparator2.compare(locald1, locald2) <= 0) {
          break;
        }
        if (locald2.j() != null)
        {
          this.E.a(locald2, locald1, locald2.j(), 1, 1);
          if (bool2) {
            continue;
          }
          if (!bool1) {}
        }
        else
        {
          this.E.a(locald2, locald1, locald2.l(), 1, 0);
        }
        locald2 = parame.j();
      } while (!bool1);
    }
    label245:
    if (!bool2) {
      if ((paramComparator1 != null) && ((bool2) || (parame.d() > 1)))
      {
        locald1 = parame.k();
        locald2 = parame.i();
        do
        {
          if (paramComparator1.compare(locald2, locald1) <= 0) {
            break;
          }
          if (bool1) {
            break label393;
          }
          if (locald2.i() != null)
          {
            this.E.a(locald2, locald2.i(), locald1, 1, 0);
            if (bool2) {
              continue;
            }
            if (!bool1) {}
          }
          else
          {
            this.E.a(locald2, locald2.k(), locald1, 0, 0);
          }
          locald2 = parame.i();
        } while (!bool1);
      }
    }
    if ((!bool2) && (paramComparator2 != null)) {
      if ((bool2) || (parame.e() > 1))
      {
        locald1 = parame.j();
        label393:
        locald2 = parame.h();
        do
        {
          if (paramComparator2.compare(locald2, locald1) <= 0) {
            break;
          }
          if (locald2.j() != null)
          {
            this.E.a(locald2, locald1, locald2.j(), 0, 1);
            if (bool2) {
              continue;
            }
            if (!bool1) {}
          }
          else
          {
            this.E.a(locald2, locald1, locald2.l(), 0, 0);
          }
          locald2 = parame.h();
        } while (!bool1);
      }
    }
  }
  
  private int a(e parame1, e parame2, boolean paramBoolean1, boolean paramBoolean2, int[] paramArrayOfInt)
  {
    boolean bool = d.R;
    int i1 = 0;
    if (!bool) {
      if (paramBoolean1) {
        i1 = a(parame1, parame2, paramArrayOfInt);
      }
    }
    if (!bool) {
      if (paramBoolean2) {
        i1 += b(parame1, parame2, paramArrayOfInt);
      }
    }
    return i1;
  }
  
  private int a(e parame1, e parame2, int[] paramArrayOfInt)
  {
    boolean bool2 = d.R;
    boolean bool1 = d.Q;
    int i1 = 0;
    int i2 = paramArrayOfInt[parame1.f()];
    a.c.d locald = parame1.i();
    do
    {
      while (!bool1)
      {
        if (locald == null) {
          break;
        }
        if (bool1) {
          break label163;
        }
        if (this.G[locald.e().f()] < 0)
        {
          if (!bool2) {}
          e locale = locald.i() == null ? locald.k().f() : locald.i().f();
          if (bool2) {
            continue;
          }
          if (locale != parame2)
          {
            int i3 = paramArrayOfInt[locale.f()] - i2;
            if (!bool2) {}
            if (!bool2) {}
            i1 += (i3 < 0 ? -1 : i3 > 0 ? 1 : 0);
          }
        }
        locald = locald.j();
      }
    } while (bool2);
    label163:
    return i1;
  }
  
  private int b(e parame1, e parame2, int[] paramArrayOfInt)
  {
    boolean bool2 = d.R;
    boolean bool1 = d.Q;
    int i1 = 0;
    int i2 = paramArrayOfInt[parame1.f()];
    a.c.d locald = parame1.h();
    do
    {
      while (!bool1)
      {
        if (locald == null) {
          break;
        }
        if (bool1) {
          break label163;
        }
        if (this.G[locald.f().f()] < 0)
        {
          if (!bool2) {}
          e locale = locald.j() == null ? locald.l().e() : locald.j().e();
          if (bool2) {
            continue;
          }
          if (locale != parame2)
          {
            int i3 = paramArrayOfInt[locale.f()] - i2;
            if (!bool2) {}
            if (!bool2) {}
            i1 += (i3 < 0 ? -1 : i3 > 0 ? 1 : 0);
          }
        }
        locald = locald.i();
      }
    } while (bool2);
    label163:
    return i1;
  }
  
  private int c(e parame1, e parame2, int[] paramArrayOfInt)
  {
    boolean bool2 = d.R;
    boolean bool1 = d.Q;
    a.c.d locald1 = parame1.h();
    a.c.d locald2 = parame2.h();
    int i1 = 0;
    int i2 = 0;
    label504:
    label510:
    label639:
    do
    {
      do
      {
        Object localObject;
        int i6;
        int i9;
        int i10;
        int i11;
        do
        {
          e locale2;
          a.c.d locald3;
          e locale3;
          do
          {
            do
            {
              if (locald1 == null) {
                break label897;
              }
              if (bool1) {
                break label909;
              }
              if (locald2 == null) {
                break label897;
              }
              i3 = 1;
              if (bool2) {
                break label531;
              }
              if (this.G[locald1.f().f()] >= 0) {
                break label518;
              }
              if (!bool2) {}
              localObject = locald1.j() == null ? locald1.l() : locald1.j();
              locale2 = ((a.c.d)localObject).e();
              if (!bool2)
              {
                if (locale2 != parame2) {
                  break;
                }
                locald1 = locald1.i();
              }
            } while ((!bool2) && (!bool1));
            if (!bool2) {}
            i6 = paramArrayOfInt[locale2.f()] < paramArrayOfInt[parame1.f()] ? 1 : 0;
            if (bool2) {
              break label510;
            }
            if (this.G[locald2.f().f()] >= 0) {
              break label504;
            }
            if (!bool2) {}
            locald3 = locald2.j() == null ? locald2.l() : locald2.j();
            locale3 = locald3.e();
            if (!bool2)
            {
              if (locale3 != parame1) {
                break;
              }
              locald2 = locald2.i();
            }
          } while ((!bool2) && (!bool1));
          if (!bool2) {}
          i9 = paramArrayOfInt[locale3.f()] < paramArrayOfInt[parame2.f()] ? 1 : 0;
          if (!bool2)
          {
            if (i9 == i6)
            {
              i10 = paramArrayOfInt[locale2.f()] - paramArrayOfInt[locale3.f()];
              if (!bool2) {
                if (i10 == 0)
                {
                  int i13 = this.q[(i11 = ((a.c.d)localObject).d())];
                  int i12;
                  int i14 = this.q[(i12 = locald3.d())];
                  if (bool2) {
                    break label850;
                  }
                  if (i13 == -2) {
                    break label848;
                  }
                  if (bool2) {
                    break label850;
                  }
                  if (i14 == -2) {
                    break label848;
                  }
                  if (!bool2)
                  {
                    if (i13 < i14)
                    {
                      i3 = 0;
                      if (bool2) {
                        break label850;
                      }
                      if (!bool1) {
                        break label848;
                      }
                    }
                    if (bool2) {
                      break label850;
                    }
                  }
                  if (i13 != i14) {
                    break label848;
                  }
                  int i15 = this.s[i11];
                  int i16 = this.s[i12];
                  if (bool2) {
                    break label850;
                  }
                  if (i15 == 0) {
                    break label848;
                  }
                  if (bool2) {
                    break label850;
                  }
                  if (i16 == 0) {
                    break label848;
                  }
                  if (bool2) {
                    break label850;
                  }
                  if (i15 >= i16) {
                    break label848;
                  }
                  i3 = 0;
                  if (bool2) {
                    break label850;
                  }
                  if (!bool1) {
                    break label848;
                  }
                }
              }
              if (!bool2) {}
              i3 = i10 > 0 ? 1 : 0;
              if (bool2) {
                break label850;
              }
              if (!bool1) {
                break label848;
              }
            }
            i3 = i6;
          }
          if (bool2) {
            break label850;
          }
          if (!bool1) {
            break label848;
          }
          i3 = i6;
          if (bool2) {
            break label850;
          }
          if (!bool1) {
            break label848;
          }
          if (bool2) {
            break label649;
          }
          if (this.G[locald2.f().f()] >= 0) {
            break label639;
          }
          if (!bool2) {}
          localObject = locald2.j() == null ? locald2.l().e() : locald2.j().e();
          if (!bool2)
          {
            if (localObject != parame1) {
              break;
            }
            locald2 = locald2.i();
          }
        } while ((!bool2) && (!bool1));
        if (!bool2) {}
        int i3 = paramArrayOfInt[localObject.f()] >= paramArrayOfInt[parame1.f()] ? 1 : 0;
        if (!bool2) {
          if (bool1)
          {
            int i4 = paramArrayOfInt[locald1.f().f()];
            int i5 = paramArrayOfInt[locald2.f().f()];
            if (!bool2)
            {
              if (i4 == i5)
              {
                int i8 = this.r[(i6 = locald1.d())];
                int i7;
                i9 = this.r[(i7 = locald2.d())];
                if (bool2) {
                  break label850;
                }
                if (i8 == -2) {
                  break label848;
                }
                if (bool2) {
                  break label850;
                }
                if (i9 == -2) {
                  break label848;
                }
                if (!bool2)
                {
                  if (i8 > i9)
                  {
                    i3 = 0;
                    if (bool2) {
                      break label850;
                    }
                    if (!bool1) {
                      break label848;
                    }
                  }
                  if (bool2) {
                    break label850;
                  }
                }
                if (i8 != i9) {
                  break label848;
                }
                i10 = this.t[i6];
                i11 = this.t[i7];
                if (bool2) {
                  break label850;
                }
                if (i10 == 0) {
                  break label848;
                }
                if (bool2) {
                  break label850;
                }
                if (i11 == 0) {
                  break label848;
                }
                if (bool2) {
                  break label850;
                }
                if (i10 <= i11) {
                  break label848;
                }
                i3 = 0;
                if (bool2) {
                  break label850;
                }
                if (!bool1) {
                  break label848;
                }
              }
              if (bool2) {
                break label842;
              }
            }
            i3 = i4 < i5 ? 1 : 0;
          }
        }
        if (bool2) {
          break label894;
        }
        if (i3 == 0) {
          break;
        }
        i2 += i1;
        locald1 = locald1.i();
        if (bool2) {
          break label894;
        }
      } while (!bool1);
      i1++;
      locald2 = locald2.i();
    } while (!bool1);
    label518:
    label531:
    label842:
    label848:
    label850:
    label894:
    if (!bool2)
    {
      if ((i1 > 0) && (locald1 != null))
      {
        if (bool1) {
          break label1021;
        }
        if (this.G[locald1.f().f()] < 0)
        {
          if (!bool2) {}
          locale1 = locald1.j() == null ? locald1.l().e() : locald1.j().e();
          if (bool2) {
            break label1009;
          }
          if (locale1 == parame2) {
            break label1002;
          }
          i2 += i1;
          if (bool2) {
            break label1011;
          }
          if (!bool1) {
            break label1002;
          }
        }
      }
      while (bool2)
      {
        e locale1;
        i2 += i1;
        locald1 = locald1.i();
        if (!bool1) {
          break;
        }
      }
    }
    label649:
    label909:
    label1002:
    label1009:
    label1011:
    label1021:
    return i2;
  }
  
  private int d(e parame1, e parame2, int[] paramArrayOfInt)
  {
    boolean bool2 = d.R;
    boolean bool1 = d.Q;
    a.c.d locald1 = parame1.i();
    a.c.d locald2 = parame2.i();
    int i1 = 0;
    int i2 = 0;
    label504:
    label510:
    label639:
    do
    {
      do
      {
        Object localObject;
        int i6;
        int i9;
        int i10;
        int i11;
        do
        {
          e locale2;
          a.c.d locald3;
          e locale3;
          do
          {
            do
            {
              if (locald1 == null) {
                break label897;
              }
              if (bool1) {
                break label909;
              }
              if (locald2 == null) {
                break label897;
              }
              i3 = 1;
              if (bool2) {
                break label531;
              }
              if (this.G[locald1.e().f()] >= 0) {
                break label518;
              }
              if (!bool2) {}
              localObject = locald1.i() == null ? locald1.k() : locald1.i();
              locale2 = ((a.c.d)localObject).f();
              if (!bool2)
              {
                if (locale2 != parame2) {
                  break;
                }
                locald1 = locald1.j();
              }
            } while ((!bool2) && (!bool1));
            if (!bool2) {}
            i6 = paramArrayOfInt[locale2.f()] < paramArrayOfInt[parame1.f()] ? 1 : 0;
            if (bool2) {
              break label510;
            }
            if (this.G[locald2.e().f()] >= 0) {
              break label504;
            }
            if (!bool2) {}
            locald3 = locald2.i() == null ? locald2.k() : locald2.i();
            locale3 = locald3.f();
            if (!bool2)
            {
              if (locale3 != parame1) {
                break;
              }
              locald2 = locald2.j();
            }
          } while ((!bool2) && (!bool1));
          if (!bool2) {}
          i9 = paramArrayOfInt[locale3.f()] < paramArrayOfInt[parame2.f()] ? 1 : 0;
          if (!bool2)
          {
            if (i9 == i6)
            {
              i10 = paramArrayOfInt[locale2.f()] - paramArrayOfInt[locale3.f()];
              if (!bool2) {
                if (i10 == 0)
                {
                  int i13 = this.r[(i11 = ((a.c.d)localObject).d())];
                  int i12;
                  int i14 = this.r[(i12 = locald3.d())];
                  if (bool2) {
                    break label850;
                  }
                  if (i13 == -2) {
                    break label848;
                  }
                  if (bool2) {
                    break label850;
                  }
                  if (i14 == -2) {
                    break label848;
                  }
                  if (!bool2)
                  {
                    if (i13 < i14)
                    {
                      i3 = 0;
                      if (bool2) {
                        break label850;
                      }
                      if (!bool1) {
                        break label848;
                      }
                    }
                    if (bool2) {
                      break label850;
                    }
                  }
                  if (i13 != i14) {
                    break label848;
                  }
                  int i15 = this.t[i11];
                  int i16 = this.t[i12];
                  if (bool2) {
                    break label850;
                  }
                  if (i15 == 0) {
                    break label848;
                  }
                  if (bool2) {
                    break label850;
                  }
                  if (i16 == 0) {
                    break label848;
                  }
                  if (bool2) {
                    break label850;
                  }
                  if (i15 >= i16) {
                    break label848;
                  }
                  i3 = 0;
                  if (bool2) {
                    break label850;
                  }
                  if (!bool1) {
                    break label848;
                  }
                }
              }
              if (!bool2) {}
              i3 = i10 > 0 ? 1 : 0;
              if (bool2) {
                break label850;
              }
              if (!bool1) {
                break label848;
              }
            }
            i3 = i6;
          }
          if (bool2) {
            break label850;
          }
          if (!bool1) {
            break label848;
          }
          i3 = i6;
          if (bool2) {
            break label850;
          }
          if (!bool1) {
            break label848;
          }
          if (bool2) {
            break label649;
          }
          if (this.G[locald2.e().f()] >= 0) {
            break label639;
          }
          if (!bool2) {}
          localObject = locald2.i() == null ? locald2.k().f() : locald2.i().f();
          if (!bool2)
          {
            if (localObject != parame1) {
              break;
            }
            locald2 = locald2.j();
          }
        } while ((!bool2) && (!bool1));
        if (!bool2) {}
        int i3 = paramArrayOfInt[localObject.f()] >= paramArrayOfInt[parame1.f()] ? 1 : 0;
        if (!bool2) {
          if (bool1)
          {
            int i4 = paramArrayOfInt[locald1.e().f()];
            int i5 = paramArrayOfInt[locald2.e().f()];
            if (!bool2)
            {
              if (i4 == i5)
              {
                int i8 = this.q[(i6 = locald1.d())];
                int i7;
                i9 = this.q[(i7 = locald2.d())];
                if (bool2) {
                  break label850;
                }
                if (i8 == -2) {
                  break label848;
                }
                if (bool2) {
                  break label850;
                }
                if (i9 == -2) {
                  break label848;
                }
                if (!bool2)
                {
                  if (i8 > i9)
                  {
                    i3 = 0;
                    if (bool2) {
                      break label850;
                    }
                    if (!bool1) {
                      break label848;
                    }
                  }
                  if (bool2) {
                    break label850;
                  }
                }
                if (i8 != i9) {
                  break label848;
                }
                i10 = this.s[i6];
                i11 = this.s[i7];
                if (bool2) {
                  break label850;
                }
                if (i10 == 0) {
                  break label848;
                }
                if (bool2) {
                  break label850;
                }
                if (i11 == 0) {
                  break label848;
                }
                if (bool2) {
                  break label850;
                }
                if (i10 <= i11) {
                  break label848;
                }
                i3 = 0;
                if (bool2) {
                  break label850;
                }
                if (!bool1) {
                  break label848;
                }
              }
              if (bool2) {
                break label842;
              }
            }
            i3 = i4 < i5 ? 1 : 0;
          }
        }
        if (bool2) {
          break label894;
        }
        if (i3 == 0) {
          break;
        }
        i2 += i1;
        locald1 = locald1.j();
        if (bool2) {
          break label894;
        }
      } while (!bool1);
      i1++;
      locald2 = locald2.j();
    } while (!bool1);
    label518:
    label531:
    label842:
    label848:
    label850:
    label894:
    if (!bool2)
    {
      if ((i1 > 0) && (locald1 != null))
      {
        if (bool1) {
          break label1021;
        }
        if (this.G[locald1.e().f()] < 0)
        {
          if (!bool2) {}
          locale1 = locald1.i() == null ? locald1.k().f() : locald1.i().f();
          if (bool2) {
            break label1009;
          }
          if (locale1 == parame2) {
            break label1002;
          }
          i2 += i1;
          if (bool2) {
            break label1011;
          }
          if (!bool1) {
            break label1002;
          }
        }
      }
      while (bool2)
      {
        e locale1;
        i2 += i1;
        locald1 = locald1.j();
        if (!bool1) {
          break;
        }
      }
    }
    label649:
    label909:
    label1002:
    label1009:
    label1011:
    label1021:
    return i2;
  }
  
  public void a(o paramo, ac paramac, bc parambc, rb paramrb)
  {
    boolean bool2 = d.R;
    boolean bool1 = d.Q;
    this.M = ((hb)paramo.c(d.N).get(paramo));
    this.L = ((m)paramo.c(d.M).get(paramo));
    this.F = new z[paramac.a()];
    int i1 = 0;
    ArrayList localArrayList = new ArrayList();
    int i2 = 0;
    w localw = paramo.v();
    ec localec;
    do
    {
      if (!localw.e()) {
        break;
      }
      localec = parambc.a(localw.d());
      i2 += localec.c();
      localw.f();
      if (bool2) {
        break label185;
      }
      if (bool1) {
        break label178;
      }
    } while (!bool1);
    this.G = new int[paramo.j() + i2 / 2];
    if (!bool2)
    {
      this.H = new int[paramo.j() + i2 / 2];
      label178:
      label185:
      if (bool2) {
        break label275;
      }
      if (!this.M.o()) {}
    }
    else
    {
      this.N = new ec[paramo.j() + i2 / 2];
      localw = paramo.v();
    }
    while (bool2) {
      do
      {
        if (!localw.e()) {
          break;
        }
        localec = parambc.a(localw.d());
        this.N[localw.d().f()] = localec;
        localw.f();
      } while (!bool1);
    }
    label275:
    int i3 = 0;
    break label360;
    label279:
    if (i3 < paramac.a()) {
      this.F[i3] = new z();
    }
    Object localObject1;
    Object localObject2;
    label360:
    Object localObject3;
    label564:
    label604:
    do
    {
      i4 = 0;
      if (bool1) {
        break label782;
      }
      localObject1 = paramac.a(i3).c().f();
      do
      {
        if (localObject1 == null) {
          break label681;
        }
        e locale1 = (e)((v)localObject1).c();
        localObject2 = parambc.a(locale1);
        if (bool1) {
          break label279;
        }
        if (((ec)localObject2).c() > 0)
        {
          localObject3 = ((ec)localObject2).b();
          do
          {
            if (localObject3 == null) {
              break label604;
            }
            a.c.d locald = (a.c.d)((v)localObject3).c();
            y localy = parambc.a(locald);
            if (bool1) {
              break;
            }
            if (locald.e() == locale1)
            {
              e locale2 = paramo.i();
              localArrayList.add(locale2);
              if (!bool2)
              {
                if (localy.l())
                {
                  paramrb.b(locale2, locale1, locald, false, true);
                  paramrb.a(locale2, locald.f(), locald, false, true);
                  i1 = Math.max(i1, locald.f().d());
                  if (bool2) {
                    break label564;
                  }
                  if (!bool1) {}
                }
                else
                {
                  paramrb.a(locale1, locale2, locald, true, false);
                  paramrb.b(locald.f(), locale2, locald, true, false);
                }
              }
              else {
                i1 = Math.max(i1, locald.f().e());
              }
              i1 = Math.max(2, i1);
              this.H[locale2.f()] = -1;
              this.G[locale2.f()] = (-(i3 + 1));
            }
            localObject3 = ((v)localObject3).a();
          } while (!bool1);
        }
        i1 = Math.max(i1, Math.max(locale1.d(), locale1.e()));
        this.F[i3].b(locale1);
        this.H[locale1.f()] = i4;
        this.G[locale1.f()] = i3;
        i4++;
        localObject1 = ((v)localObject1).a();
        if (bool2) {
          break;
        }
      } while (!bool1);
      i3++;
      if (bool2) {
        break label279;
      }
      if (!bool1) {
        break;
      }
      this.m = new z();
      this.n = new z();
      this.o = new z();
      this.p = new z();
      this.i = new e[paramo.k()];
      this.g = new float[paramo.k()];
      this.l = new v[paramo.l()];
    } while (bool2);
    label681:
    z localz1 = new z();
    label782:
    int i4 = paramo.l() - 1;
    if (i4 >= 0)
    {
      if (!bool2) {
        this.l[i4] = localz1.a(null);
      }
    }
    else
    {
      do
      {
        localz1.b();
        i4--;
        if (bool1) {
          break label864;
        }
        if (!bool1) {
          break;
        }
        this.h = new float[i1 + 2];
      } while (bool2);
      this.d = new f_(this.g);
    }
    label864:
    cc localcc = b(paramo, paramac, parambc, this.H, this.G);
    a(paramo, this.F, this.H);
    if (!bool2) {
      if (this.L != null)
      {
        this.j = new int[paramo.k()];
        this.k = new int[paramo.k()];
        this.L.a(paramo, parambc, false);
        this.L.a(paramo, this.k, this.j);
        localObject1 = this.L.a(paramo, this.F, this.H);
        int i7 = 0;
        do
        {
          if (i7 >= this.F.length) {
            break;
          }
          a(this.F[i7], this.H, (Comparator)localObject1);
          i7++;
          if ((!bool2) && (bool1)) {
            break label1178;
          }
        } while (!bool1);
      }
    }
    if ((!bool2) && (!bool2)) {
      if (a(paramo, this.F, parambc))
      {
        this.K = new cc.j_(this.I);
        int i5 = 0;
        do
        {
          if (i5 >= this.F.length) {
            break;
          }
          a(this.F[i5], this.H, this.K);
          i5++;
          if ((!bool2) && (bool1)) {
            break label1178;
          }
        } while (!bool1);
      }
    }
    this.E = paramo;
    try
    {
      this.y = localcc.c(false);
      this.z = localcc.c(true);
      this.A = localcc.e(true);
      this.B = localcc.e(false);
      this.C = this.y;
      if (!bool2) {
        this.D = this.z;
      }
      label1178:
      long l1 = System.currentTimeMillis();
      localObject2 = new wb(666L);
      a(paramo, this.F, this.H, null);
      this.M.a(this.F, this.H, true);
      localObject3 = new int[this.H.length];
      int i8 = a((wb)localObject2);
      if (!bool2)
      {
        a(this.H, (int[])localObject3);
        if ((System.currentTimeMillis() - l1 < this.e) && ((bool2) || (i8 > 0)))
        {
          int i9 = 0;
          label1586:
          label1720:
          label1749:
          label1751:
          do
          {
            do
            {
              if (i9 >= this.a) {
                break label1783;
              }
              if (bool1) {
                break label1798;
              }
              if ((i8 <= 0) || ((!bool2) && (System.currentTimeMillis() - l1 >= this.e))) {
                break label1783;
              }
              if (!bool2)
              {
                if ((i9 & 0x3) < 2) {
                  a(paramo, this.F, this.H, (wb)localObject2);
                }
              }
              else
              {
                if (bool2) {
                  break;
                }
                if (!bool1) {
                  break label1720;
                }
              }
              do
              {
                if (bool2) {
                  break;
                }
                if (this.I == null)
                {
                  if (bool2) {
                    continue;
                  }
                  if (this.L == null)
                  {
                    i10 = 0;
                    do
                    {
                      if (i10 >= this.g.length) {
                        break;
                      }
                      this.g[i10] = ((wb)localObject2).nextFloat();
                      i10++;
                      if (bool2) {
                        break label1675;
                      }
                      if (bool1) {
                        break label1673;
                      }
                    } while (!bool1);
                  }
                }
              } while (bool2);
              if (this.I != null)
              {
                i10 = 0;
                do
                {
                  do
                  {
                    if (i10 >= this.F.length) {
                      break;
                    }
                    localz2 = this.F[i10];
                    if (bool2) {
                      break label1675;
                    }
                    if (bool1) {
                      break label1673;
                    }
                    localv = localz2.f();
                    do
                    {
                      if (localv == null) {
                        break label1586;
                      }
                      locale3 = (e)localv.c();
                      i11 = locale3.f();
                      i12 = this.I[i11];
                      if (bool1) {
                        break;
                      }
                      if (i12 < 0)
                      {
                        this.g[i11] = (((wb)localObject2).nextFloat() * (this.J[i10] + 1) * 2.0F);
                        if (bool2) {
                          continue;
                        }
                        if (!bool1) {}
                      }
                      else
                      {
                        this.g[i11] = (((wb)localObject2).nextFloat() + (i12 + 1) * 2);
                      }
                      localv = localv.a();
                    } while (!bool1);
                    i10++;
                  } while (bool2);
                } while (!bool1);
              }
              if (bool2) {
                break;
              }
              i10 = 0;
              while (bool2) {
                do
                {
                  z localz2;
                  v localv;
                  e locale3;
                  int i11;
                  int i12;
                  if (i10 >= this.g.length) {
                    break;
                  }
                  this.g[i10] = (((wb)localObject2).nextFloat() * this.j[i10] + this.k[i10]);
                  i10++;
                  if (bool2) {
                    break label1675;
                  }
                  if (bool1) {
                    break label1673;
                  }
                } while (!bool1);
              }
              i10 = 0;
              do
              {
                if (i10 >= this.F.length) {
                  break;
                }
                a(this.F[i10], this.H, this.d);
                i10++;
                if (bool2) {
                  break label1751;
                }
                if (bool1) {
                  break label1749;
                }
              } while (!bool1);
              this.M.a(this.F, this.H, true);
            } while (bool2);
            int i10 = a((wb)localObject2);
            if (!bool2)
            {
              if (i10 < i8)
              {
                a(this.H, (int[])localObject3);
                i8 = i10;
              }
              i9++;
            }
          } while (!bool1);
          label1673:
          label1675:
          label1783:
          if (bool2) {
            break label1806;
          }
          b((int[])localObject3);
        }
      }
      if (this.b) {
        label1798:
        label1806:
        a(this.H);
      }
    }
    finally
    {
      if (!bool2) {
        if (this.L != null)
        {
          Comparator localComparator = this.L.a(paramo, this.F, this.H);
          int i14 = 0;
          if (i14 < this.F.length) {}
          while (bool2)
          {
            a(this.F[i14], this.H, localComparator);
            i14++;
            if (bool2) {
              break label1925;
            }
            if (bool1) {
              break label1923;
            }
            if (!bool1) {
              break;
            }
          }
          this.L.b(paramo, parambc, false);
          label1923:
          label1925:
          if (bool2) {
            break label1991;
          }
          if (!bool1) {
            break label1990;
          }
        }
      }
      if (this.K != null)
      {
        i13 = 0;
        do
        {
          if (i13 >= this.F.length) {
            break;
          }
          a(this.F[i13], this.H, this.K);
          i13++;
          if (bool2) {
            break label1995;
          }
          if (bool1) {
            break label1993;
          }
        } while (!bool1);
      }
      label1990:
      label1991:
      int i13 = 0;
      label1993:
      label1995:
      if (i13 < localArrayList.size())
      {
        paramo.a((e)localArrayList.get(i13));
        i13++;
      }
      for (;;)
      {
        if ((bool2) || (!bool1))
        {
          if (!bool1) {
            break;
          }
          this.E = null;
          this.H = null;
          this.G = null;
          this.o = null;
          this.p = null;
          this.m = null;
          this.n = null;
          this.g = null;
          this.l = null;
          this.h = null;
          this.i = null;
          this.q = null;
          this.r = null;
          this.d = null;
          this.s = null;
          this.t = null;
          this.y = null;
          this.z = null;
          this.A = null;
          this.B = null;
          this.C = null;
          this.D = null;
          this.K = null;
          if (!bool2) {
            this.I = null;
          }
        }
      }
    }
    if (!bool2)
    {
      if (this.F != null)
      {
        int i6 = 0;
        if (i6 < paramac.a())
        {
          paramac.a(i6).a(this.F[i6]);
          i6++;
        }
        while (bool2)
        {
          if (bool2) {
            break label2256;
          }
          if (bool1) {
            break label2253;
          }
          if (!bool1) {
            break;
          }
        }
        this.M.g(paramac);
      }
      this.F = null;
    }
    this.M = null;
    label2253:
    label2256:
    if ((bool2) || (q.n))
    {
      if (!bool2) {}
      d.Q = !bool1;
    }
    if (q.o) {
      d.R = !bool2;
    }
  }
  
  private void a(o paramo, z[] paramArrayOfz, int[] paramArrayOfInt)
  {
    boolean bool2 = d.R;
    boolean bool1 = d.Q;
    int[] arrayOfInt = new int[paramArrayOfInt.length];
    Object localObject = paramo.v();
    label199:
    do
    {
      if (!((w)localObject).e()) {
        break;
      }
      e locale = ((w)localObject).d();
      int i2 = 0;
      a.c.m localm = locale.l();
      do
      {
        if (!localm.e()) {
          break label199;
        }
        if (bool1) {
          break;
        }
        if (i2 <= -3) {
          break label199;
        }
        a.c.d locald = localm.a();
        int i3 = locald.e() == locale ? this.q[locald.d()] : this.r[locald.d()];
        if (!bool2)
        {
          if (i3 == -1)
          {
            if (!bool2) {}
            i2 = i2 == 1 ? -3 : -1;
            if (bool2) {
              continue;
            }
            if (!bool1) {}
          }
          else
          {
            if (bool2) {
              continue;
            }
          }
        }
        else if (i3 == 1)
        {
          if (!bool2) {}
          i2 = i2 == -1 ? -3 : 1;
        }
        localm.f();
      } while (!bool1);
      if (bool2) {
        break;
      }
      if (!bool2) {}
      arrayOfInt[locale.f()] = (i2 < -1 ? 0 : i2);
      ((w)localObject).f();
    } while (!bool1);
    localObject = new Comparator()
    {
      private final int[] val$nodePorts;
      
      public int compare(Object paramAnonymousObject1, Object paramAnonymousObject2)
      {
        e locale1 = (e)paramAnonymousObject1;
        e locale2 = (e)paramAnonymousObject2;
        return l.a(this.val$nodePorts[locale2.f()], this.val$nodePorts[locale1.f()]);
      }
    };
    int i1 = 0;
    do
    {
      while (!bool1)
      {
        if (i1 >= paramArrayOfz.length) {
          break;
        }
        a(paramArrayOfz[i1], paramArrayOfInt, (Comparator)localObject);
        i1++;
      }
    } while (bool2);
  }
  
  boolean a(q paramq, z[] paramArrayOfz, bc parambc)
  {
    boolean bool2 = d.R;
    boolean bool1 = d.Q;
    int[] arrayOfInt = new int[paramq.j()];
    int i1 = 0;
    do
    {
      do
      {
        if (i1 >= arrayOfInt.length) {
          break;
        }
        arrayOfInt[i1] = -1;
        i1++;
        if (bool2) {
          break label62;
        }
        if (bool1) {
          break label61;
        }
      } while (!bool1);
    } while (bool2);
    i1 = 0;
    label61:
    label62:
    int i2 = -1;
    int i3 = 0;
    label196:
    label198:
    do
    {
      do
      {
        if (i3 >= paramArrayOfz.length) {
          break;
        }
        z localz = paramArrayOfz[i3];
        if (bool2) {
          break label339;
        }
        if (bool1) {
          break label338;
        }
        v localv = localz.f();
        do
        {
          if (localv == null) {
            break;
          }
          e locale = (e)localv.c();
          vc localvc = parambc.a(locale).n();
          if (bool2) {
            break label198;
          }
          if (bool1) {
            break label196;
          }
          if (!bool2)
          {
            if (localvc != null) {
              i1++;
            }
          }
          else
          {
            int i4 = localvc.j();
            arrayOfInt[locale.f()] = i4;
            i2 = Math.max(i2, i4);
          }
          localv = localv.a();
        } while (!bool1);
        if (!bool2) {
          i3++;
        }
      } while (!bool1);
    } while (bool2);
    if ((bool2) || (i1 > 0)) {
      if (!bool2)
      {
        if (i2 > 0)
        {
          this.I = arrayOfInt;
          this.J = new int[paramArrayOfz.length];
        }
      }
      else
      {
        i3 = 0;
        if (i3 < this.J.length) {}
        while (bool2)
        {
          this.J[i3] = i2;
          i3++;
          if (bool2) {
            break label327;
          }
          if (bool1) {
            break label326;
          }
          if (!bool1) {
            break;
          }
        }
        if ((bool2) || (this.M != null))
        {
          if (bool2) {
            break label327;
          }
          if (this.M.o()) {
            this.M.a(paramArrayOfz, arrayOfInt, this.J);
          }
        }
        label326:
        label327:
        return true;
      }
    }
    this.I = null;
    this.J = null;
    label338:
    label339:
    return false;
  }
  
  void a(q paramq, z[] paramArrayOfz, int[] paramArrayOfInt, wb paramwb)
  {
    boolean bool2 = d.R;
    boolean bool1 = d.Q;
    Object localObject1 = null;
    v[] arrayOfv = new v[paramq.j()];
    int[] arrayOfInt = new int[paramq.j()];
    int i1 = 0;
    Object localObject2;
    Object localObject3;
    label145:
    label147:
    do
    {
      if (i1 >= paramArrayOfz.length) {
        break;
      }
      localObject2 = paramArrayOfz[i1];
      if (bool1) {
        break label293;
      }
      if ((bool2) || (localObject1 == null)) {
        localObject1 = (e)((z)localObject2).a();
      }
      localObject3 = ((z)localObject2).f();
      do
      {
        if (localObject3 == null) {
          break;
        }
        e locale = (e)((v)localObject3).c();
        arrayOfv[locale.f()] = localObject3;
        arrayOfInt[locale.f()] = (i1 + 1);
        localObject3 = ((v)localObject3).a();
        if (bool2) {
          break label147;
        }
        if (bool1) {
          break label145;
        }
      } while (!bool1);
      if (!bool2) {
        i1++;
      }
    } while (!bool1);
    if (!bool2)
    {
      if ((bool2) || (paramwb != null))
      {
        i1 = paramwb.nextInt(paramq.j());
        localObject2 = paramq.v();
        do
        {
          if (!((w)localObject2).e()) {
            break;
          }
          localObject3 = ((w)localObject2).d();
          if ((!bool2) && (bool1)) {
            break label262;
          }
          if (!bool2) {
            if (i1 == 0)
            {
              localObject1 = localObject3;
              if (!bool2) {
                if (!bool1) {
                  break;
                }
              }
            }
            else
            {
              ((w)localObject2).f();
              i1--;
            }
          }
        } while (!bool1);
        if (!bool2) {
          a(paramq, paramwb);
        }
        label262:
        Arrays.fill(paramArrayOfInt, 0);
      }
      paramq.a(new cc.r_(this.r), new cc.r_(this.q));
    }
    label293:
    h local6 = new h()
    {
      private final v[] val$cells;
      private final int[] val$layerIndex;
      private final z[] val$layers;
      
      protected void a(e paramAnonymouse, int paramAnonymousInt)
      {
        v localv = this.val$cells[paramAnonymouse.f()];
        int i = this.val$layerIndex[paramAnonymouse.f()] - 1;
        if (i >= 0)
        {
          z localz = this.val$layers[i];
          localz.h(localv);
          localz.a(localv);
        }
      }
    };
    local6.a(false);
    local6.b(true);
    local6.a(paramq, (e)localObject1);
    if (!bool2) {
      if (this.L != null)
      {
        localObject2 = this.L.a(paramq, paramArrayOfz, paramArrayOfInt);
        int i3 = 0;
        do
        {
          if (i3 >= paramArrayOfz.length) {
            break;
          }
          a(paramArrayOfz[i3], paramArrayOfInt, (Comparator)localObject2);
          i3++;
        } while (!bool1);
      }
    }
    if (this.K != null)
    {
      i2 = 0;
      do
      {
        if (i2 >= paramArrayOfz.length) {
          break;
        }
        a(paramArrayOfz[i2], paramArrayOfInt, this.K);
        i2++;
      } while (!bool1);
    }
    int i2 = 0;
    do
    {
      if (i2 >= paramArrayOfz.length) {
        break;
      }
      a(paramArrayOfz[i2], paramArrayOfInt);
      i2++;
    } while (!bool1);
  }
  
  private int a(wb paramwb)
  {
    boolean bool2 = d.R;
    boolean bool1 = d.Q;
    qb.a();
    int i1 = 0;
    int i2 = 2147483647;
    int i3 = 2147483647;
    int[] arrayOfInt = new int[this.H.length];
    int i4 = paramwb.nextInt(2);
    int i5 = 0;
    int i6 = 0;
    label140:
    label143:
    do
    {
      do
      {
        if (i6 >= 2) {
          break;
        }
        if (bool1) {
          break label173;
        }
        if (i5 >= 6) {
          break;
        }
        if (bool2) {
          break label162;
        }
        if (i2 <= 0) {
          break;
        }
        i3 = a(i4, paramwb);
        if (!bool2)
        {
          if (i3 < i2)
          {
            i2 = i3;
            i1 = 1;
            a(this.H, arrayOfInt);
            if (bool2) {
              continue;
            }
            if (!bool1) {
              break label143;
            }
          }
          if (bool2) {}
        }
        else
        {
          if (i3 <= i2) {
            break label140;
          }
          i6++;
        }
        if (!bool2)
        {
          if (bool1) {
            i5++;
          }
          i4 = (i4 + 1) % 2;
        }
      } while (!bool1);
    } while (bool2);
    label162:
    if (!bool2) {
      if ((i1 != 0) && (i3 > i2)) {
        label173:
        b(arrayOfInt);
      }
    }
    return i2;
  }
  
  private void a(z paramz, Comparator paramComparator1, Comparator paramComparator2)
  {
    boolean bool2 = d.R;
    boolean bool1 = d.Q;
    if ((bool2) || ((paramComparator1 != null) || (paramComparator2 != null)))
    {
      v localv = paramz.f();
      do
      {
        if (localv == null) {
          break;
        }
        e locale = (e)localv.c();
        if (!bool2) {
          if (paramComparator1 != null) {
            locale.a(paramComparator1);
          }
        }
        if (paramComparator2 != null) {
          locale.b(paramComparator2);
        }
        localv = localv.a();
      } while (!bool1);
    }
  }
  
  private void a(q paramq, Comparator paramComparator1, Comparator paramComparator2)
  {
    if ((d.R) || ((paramComparator1 != null) || (paramComparator2 != null))) {
      paramq.a(paramComparator1, paramComparator2);
    }
  }
  
  private int a(int paramInt, Random paramRandom)
  {
    boolean bool2 = d.R;
    boolean bool1 = d.Q;
    int i1 = 0;
    if (!bool2) {
      if (paramInt == 0)
      {
        i1 = paramRandom.nextInt(this.F.length) / 2;
        if (bool2) {
          break label112;
        }
        if (!bool1) {
          break label101;
        }
      }
    }
    if (!bool2) {
      if (paramInt == 1)
      {
        i1 = (this.F.length + paramRandom.nextInt(this.F.length)) / 2;
        if (bool2) {
          break label112;
        }
        if (!bool1) {
          break label101;
        }
      }
    }
    if (!bool2)
    {
      if (paramInt == 2) {
        i1 = paramRandom.nextInt(this.F.length);
      }
      label101:
      this.M.a(i1);
    }
    label112:
    int i2 = i1 - 1;
    do
    {
      do
      {
        if (i2 < 0) {
          break;
        }
        b(this.F, i2, this.H);
        i2--;
        if (bool2) {
          break label163;
        }
        if (bool1) {
          break label161;
        }
      } while (!bool1);
    } while (bool2);
    i2 = i1 + 1;
    label161:
    label163:
    do
    {
      do
      {
        if (i2 >= this.F.length) {
          break;
        }
        a(this.F, i2, this.H);
        i2++;
        if (bool2) {
          break label260;
        }
        if (bool1) {
          break label256;
        }
      } while (!bool1);
    } while (bool2);
    if (!bool2) {
      if (this.b)
      {
        if (!bool2) {
          if (this.M.o())
          {
            if (bool2) {
              break label260;
            }
            if (!this.c) {
              break label256;
            }
          }
        }
        a(this.H);
      }
    }
    label256:
    label260:
    return f();
  }
  
  void a(z[] paramArrayOfz, int paramInt, int[] paramArrayOfInt)
  {
    boolean bool2 = d.R;
    boolean bool1 = d.Q;
    z localz1 = paramArrayOfz[(paramInt - 1)];
    z localz2 = paramArrayOfz[paramInt];
    int i1 = localz1.size();
    int i2 = localz2.size();
    float f1 = 1.0F;
    v localv = localz2.f();
    if (localv != null) {}
    label175:
    do
    {
      e locale = (e)localv.c();
      int i4 = locale.f();
      if (bool1) {
        break label414;
      }
      switch (this.f)
      {
      case 0: 
        this.g[i4] = b(locale, i2, false, i1, paramArrayOfInt);
        if (bool2) {
          break label175;
        }
        if (!bool1) {
          break;
        }
      case 1: 
        this.g[i4] = a(locale, i2, false, i1, paramArrayOfInt);
      }
      this.g[i4] += paramArrayOfInt[i4] / (i1 * 200);
      if ((bool2) || (this.I != null))
      {
        int i5 = this.I[i4];
        if (!bool2)
        {
          if (i5 < 0) {
            this.g[i4] = (2.0F * this.g[i4] * (this.J[paramInt] + 1));
          }
        }
        else
        {
          if (bool2) {
            break label274;
          }
          if (!bool1) {
            break label264;
          }
        }
        this.g[i4] += (i5 + 1) * ((i1 + 1) * 2);
      }
      if (!bool2)
      {
        if (f1 < this.g[i4]) {
          f1 = this.g[i4];
        }
        localv = localv.a();
      }
      if (!bool1) {
        break;
      }
      if (bool2) {
        break label403;
      }
    } while (bool2);
    label264:
    label274:
    if (this.L != null)
    {
      localv = localz2.f();
      if (localv == null) {}
    }
    label403:
    while (bool2)
    {
      int i3 = ((e)localv.c()).f();
      if (bool2) {
        break label444;
      }
      this.g[i3] = (this.g[i3] / f1 * this.j[i3] + this.k[i3]);
      localv = localv.a();
      if (bool1) {
        break label443;
      }
      if (!bool1) {
        break;
      }
    }
    if (this.M.o())
    {
      label414:
      this.M.a(localz2, paramInt, this.g, paramArrayOfInt, true);
      if (bool2) {
        break label458;
      }
      if (!bool1) {}
    }
    else
    {
      label443:
      label444:
      a(localz2, paramArrayOfInt, this.d);
    }
    label458:
    if ((bool2) || (this.b))
    {
      if (!bool2) {
        if (this.M.o())
        {
          if (!bool2) {
            if (!this.c) {
              return;
            }
          }
        }
        else {
          a(localz2, this.B, null);
        }
      }
      a(localz2, true, false, paramArrayOfInt);
      a(localz1, null, this.z);
    }
  }
  
  void b(z[] paramArrayOfz, int paramInt, int[] paramArrayOfInt)
  {
    boolean bool2 = d.R;
    boolean bool1 = d.Q;
    z localz1 = paramArrayOfz[(paramInt + 1)];
    z localz2 = paramArrayOfz[paramInt];
    int i1 = localz1.size();
    int i2 = localz2.size();
    float f1 = 1.0F;
    v localv = localz2.f();
    if (localv != null) {}
    label175:
    do
    {
      e locale = (e)localv.c();
      int i4 = locale.f();
      if (bool1) {
        break label414;
      }
      switch (this.f)
      {
      case 0: 
        this.g[i4] = b(locale, i2, true, i1, paramArrayOfInt);
        if (bool2) {
          break label175;
        }
        if (!bool1) {
          break;
        }
      case 1: 
        this.g[i4] = a(locale, i2, true, i1, paramArrayOfInt);
      }
      this.g[i4] += paramArrayOfInt[i4] / (i1 * 200);
      if ((bool2) || (this.I != null))
      {
        int i5 = this.I[i4];
        if (!bool2)
        {
          if (i5 < 0) {
            this.g[i4] = (2.0F * this.g[i4] * (this.J[paramInt] + 1));
          }
        }
        else
        {
          if (bool2) {
            break label274;
          }
          if (!bool1) {
            break label264;
          }
        }
        this.g[i4] += (i5 + 1) * ((i1 + 1) * 2);
      }
      if (!bool2)
      {
        if (f1 < this.g[i4]) {
          f1 = this.g[i4];
        }
        localv = localv.a();
      }
      if (!bool1) {
        break;
      }
      if (bool2) {
        break label403;
      }
    } while (bool2);
    label264:
    label274:
    if (this.L != null)
    {
      localv = localz2.f();
      if (localv == null) {}
    }
    label403:
    while (bool2)
    {
      int i3 = ((e)localv.c()).f();
      if (bool2) {
        break label444;
      }
      this.g[i3] = (this.g[i3] / f1 * this.j[i3] + this.k[i3]);
      localv = localv.a();
      if (bool1) {
        break label443;
      }
      if (!bool1) {
        break;
      }
    }
    if (this.M.o())
    {
      label414:
      this.M.a(localz2, paramInt, this.g, paramArrayOfInt, false);
      if (bool2) {
        break label458;
      }
      if (!bool1) {}
    }
    else
    {
      label443:
      label444:
      a(localz2, paramArrayOfInt, this.d);
    }
    label458:
    if ((bool2) || (this.b))
    {
      if (!bool2) {
        if (this.M.o())
        {
          if (!bool2) {
            if (!this.c) {
              return;
            }
          }
        }
        else {
          a(localz2, null, this.A);
        }
      }
      a(localz2, false, true, paramArrayOfInt);
      a(localz1, this.y, null);
    }
  }
  
  private float a(e parame, int paramInt1, boolean paramBoolean, int paramInt2, int[] paramArrayOfInt)
  {
    boolean bool2 = d.R;
    boolean bool1 = d.Q;
    int i1 = 0;
    if (paramBoolean)
    {
      locald = parame.h();
      do
      {
        if (locald == null) {
          break;
        }
        float f1 = paramArrayOfInt[locald.f().f()];
        if (bool2) {
          break label535;
        }
        if (bool1) {
          break label526;
        }
        if ((bool2) || (this.r != null))
        {
          int i4;
          if (!bool2) {}
          switch (this.r[(i4 = locald.d())])
          {
          case 1: 
            if (!bool2)
            {
              f1 += 0.3F;
              if (!bool1) {
                break;
              }
            }
            break;
          case -1: 
            f1 -= 0.3F;
          }
          f1 += this.t[i4] * 0.01F;
        }
        this.h[i1] = f1;
        locald = locald.i();
        i1++;
      } while (!bool1);
    }
    a.c.d locald = parame.i();
    do
    {
      if (locald == null) {
        break;
      }
      int i3 = locald.e().f();
      if (bool1) {
        break label503;
      }
      if (this.G[i3] < 0)
      {
        if (!bool2) {}
        e locale = locald.i() == null ? locald.k().f() : locald.i().f();
        float f4 = paramArrayOfInt[locale.f()];
        if (!bool2) {
          if (this.q != null)
          {
            int i6;
            if (!bool2) {}
            switch (this.q[(i6 = locald.d())])
            {
            case 1: 
              if (!bool2)
              {
                f4 += 0.3F;
                if (!bool1) {
                  break;
                }
              }
              break;
            case -1: 
              f4 -= 0.3F;
            }
            f4 += this.s[i6] * 0.01F;
          }
        }
        this.h[i1] = f4;
        if (bool2) {
          continue;
        }
        if (!bool1) {}
      }
      else
      {
        f3 = paramArrayOfInt[i3];
        if (!bool2) {
          if (this.q != null)
          {
            int i5;
            if (!bool2) {}
            switch (this.q[(i5 = locald.d())])
            {
            case 1: 
              if (!bool2)
              {
                f3 += 0.3F;
                if (!bool1) {
                  break;
                }
              }
              break;
            case -1: 
              f3 -= 0.3F;
            }
            f3 += this.s[i5] * 0.01F;
          }
        }
        this.h[i1] = f3;
      }
      locald = locald.j();
      i1++;
    } while (!bool1);
    if ((!bool2) && (i1 == 0)) {
      label503:
      return (paramInt2 - 1) * paramArrayOfInt[parame.f()] / (paramInt1 - 1);
    }
    label526:
    Arrays.sort(this.h, 0, i1);
    label535:
    int i2 = i1 >> 1;
    if (!bool2) {
      if (i1 % 2 == 1) {
        return this.h[i2];
      }
    }
    if (i1 == 2) {
      return (this.h[0] + this.h[1]) * 0.5F;
    }
    float f2 = this.h[(i2 - 1)] - this.h[0];
    float f3 = this.h[(i1 - 1)] - this.h[i2];
    if (!bool2) {
      if (f2 == 0.0F)
      {
        if (bool2) {
          break label695;
        }
        if (f3 == 0.0F) {
          break label676;
        }
      }
    }
    return (this.h[(i2 - 1)] * f3 + this.h[i2] * f2) / (f2 + f3);
    label676:
    label695:
    return (this.h[(i2 - 1)] + this.h[i2]) * 0.5F;
  }
  
  private float b(e parame, int paramInt1, boolean paramBoolean, int paramInt2, int[] paramArrayOfInt)
  {
    boolean bool2 = d.R;
    boolean bool1 = d.Q;
    float f1 = 0.0F;
    if (!bool2) {}
    int i1 = paramBoolean ? parame.e() : parame.d();
    if (!bool2) {
      if (i1 == 0)
      {
        if (bool2) {
          break label759;
        }
        f1 = (paramInt2 - 1) * paramArrayOfInt[parame.f()] / (paramInt1 - 1);
        if (!bool1) {
          break label757;
        }
      }
    }
    a.c.d locald1;
    int i2;
    e locale;
    int i5;
    label396:
    if (paramBoolean)
    {
      locald1 = parame.h();
      label282:
      do
      {
        if (locald1 == null) {
          break;
        }
        i2 = locald1.f().f();
        if (!bool2)
        {
          if (bool1) {
            break label757;
          }
          if (bool2) {}
        }
        else
        {
          if (this.G[i2] < 0)
          {
            if (!bool2) {}
            a.c.d locald2 = locald1.j() == null ? locald1.l() : locald1.j();
            locale = locald2.e();
            f1 += (paramInt2 - 1) * paramArrayOfInt[locale.f()] / (paramInt1 - 1);
            if (bool2) {
              continue;
            }
            if (this.q == null) {
              break label396;
            }
            if (!bool2)
            {
              switch (this.q[(i5 = locald2.d())])
              {
              case 1: 
                f1 -= 0.3F;
                if (bool2) {
                  break label282;
                }
                if (!bool1) {
                  break;
                }
              case -1: 
                f1 += 0.3F;
              }
              f1 -= this.s[i5] * 0.01F;
            }
            if (bool2) {
              continue;
            }
            if (!bool1) {
              break label396;
            }
          }
          f1 += paramArrayOfInt[i2];
          if (bool2) {
            continue;
          }
        }
        if (this.r != null)
        {
          int i3;
          if (!bool2) {}
          switch (this.r[(i3 = locald1.d())])
          {
          case 1: 
            if (!bool2)
            {
              f1 += 0.3F;
              if (!bool1) {
                break;
              }
            }
            break;
          case -1: 
            f1 -= 0.3F;
          }
          f1 += this.t[i3] * 0.01F;
        }
        locald1 = locald1.i();
      } while (!bool1);
    }
    if (!bool2)
    {
      locald1 = parame.i();
      label618:
      do
      {
        if (locald1 == null) {
          break;
        }
        i2 = locald1.e().f();
        if (!bool2)
        {
          if (bool1) {
            break label757;
          }
          if (bool2) {}
        }
        else
        {
          if (this.G[i2] < 0)
          {
            if (!bool2) {}
            a.c.d locald3 = locald1.i() == null ? locald1.k() : locald1.i();
            locale = locald3.f();
            f1 += (paramInt2 - 1) * paramArrayOfInt[locale.f()] / (paramInt1 - 1);
            if (bool2) {
              continue;
            }
            if (this.r == null) {
              break label732;
            }
            if (!bool2)
            {
              switch (this.r[(i5 = locald3.d())])
              {
              case 1: 
                f1 -= 0.3F;
                if (bool2) {
                  break label618;
                }
                if (!bool1) {
                  break;
                }
              case -1: 
                f1 += 0.3F;
              }
              f1 -= this.t[i5] * 0.01F;
            }
            if (bool2) {
              continue;
            }
            if (!bool1) {
              break label732;
            }
          }
          f1 += paramArrayOfInt[i2];
          if (bool2) {
            continue;
          }
        }
        if (this.q != null)
        {
          int i4;
          if (!bool2) {}
          switch (this.q[(i4 = locald1.d())])
          {
          case 1: 
            if (!bool2)
            {
              f1 += 0.3F;
              if (!bool1) {
                break;
              }
            }
            break;
          case -1: 
            f1 -= 0.3F;
          }
          f1 += this.s[i4] * 0.01F;
        }
        locald1 = locald1.j();
      } while (!bool1);
      label732:
      if (bool2) {
        break label759;
      }
      f1 /= i1;
    }
    label757:
    label759:
    return f1;
  }
  
  private final void a(z paramz, int[] paramArrayOfInt)
  {
    boolean bool2 = d.R;
    boolean bool1 = d.Q;
    int i1 = 0;
    v localv = paramz.f();
    do
    {
      while (!bool1)
      {
        if (localv == null) {
          break;
        }
        paramArrayOfInt[((e)localv.c()).f()] = (i1++);
        localv = localv.a();
      }
    } while (bool2);
  }
  
  private final void a(int[] paramArrayOfInt1, int[] paramArrayOfInt2)
  {
    System.arraycopy(paramArrayOfInt1, 0, paramArrayOfInt2, 0, paramArrayOfInt1.length);
  }
  
  private final void b(int[] paramArrayOfInt)
  {
    boolean bool2 = d.R;
    boolean bool1 = d.Q;
    a(paramArrayOfInt, this.H);
    do
    {
      for (int i1 = 0; !bool1; i1++)
      {
        if (i1 >= this.F.length) {
          break;
        }
        b(this.F[i1], this.H);
      }
    } while (bool2);
  }
  
  private final void b(z paramz, int[] paramArrayOfInt)
  {
    boolean bool2 = d.R;
    boolean bool1 = d.Q;
    v localv = paramz.f();
    do
    {
      if (localv == null) {
        break;
      }
      localObject = (e)localv.c();
      this.i[paramArrayOfInt[localObject.f()]] = localObject;
      localv = localv.a();
    } while (!bool1);
    int i1 = 0;
    Object localObject = paramz.f();
    do
    {
      while (!bool1)
      {
        if (localObject == null) {
          break;
        }
        ((v)localObject).a(this.i[i1]);
        localObject = ((v)localObject).a();
        i1++;
      }
    } while (bool2);
  }
  
  private final void a(z paramz, int[] paramArrayOfInt, Comparator paramComparator)
  {
    boolean bool2 = d.R;
    boolean bool1 = d.Q;
    int i1 = 0;
    v localv = paramz.f();
    do
    {
      do
      {
        if (localv == null) {
          break;
        }
        this.i[i1] = ((e)localv.c());
        if (bool2) {
          break label89;
        }
        localv = localv.a();
        i1++;
        if (bool1) {
          break label85;
        }
      } while (!bool1);
      l.a(this.i, 0, paramz.size(), paramComparator);
    } while (bool2);
    i1 = 0;
    label85:
    label89:
    localv = paramz.f();
    do
    {
      if (localv == null) {
        break;
      }
      e locale = this.i[i1];
      localv.a(locale);
      paramArrayOfInt[locale.f()] = i1;
      localv = localv.a();
      i1++;
    } while (!bool1);
  }
  
  static class e_
    implements Comparator
  {
    final byte[] a;
    final byte[] b;
    final int[] d;
    final int[] e;
    final int[] g;
    
    e_(int[] paramArrayOfInt1, byte[] paramArrayOfByte1, int[] paramArrayOfInt2, byte[] paramArrayOfByte2, int[] paramArrayOfInt3)
    {
      this.g = paramArrayOfInt1;
      this.a = paramArrayOfByte1;
      this.b = paramArrayOfByte2;
      this.d = paramArrayOfInt2;
      this.e = paramArrayOfInt3;
    }
    
    public int compare(Object paramObject1, Object paramObject2)
    {
      boolean bool = d.R;
      a.c.d locald1 = (a.c.d)paramObject1;
      a.c.d locald2 = (a.c.d)paramObject2;
      int i;
      int k = this.b[(i = locald1.d())];
      int j;
      int m = this.b[(j = locald2.d())];
      int n = l.a(k, m);
      if (!bool) {
        if (n != 0) {
          return n;
        }
      }
      int i1 = this.e[i];
      int i2 = this.e[j];
      if (!bool) {
        if (i1 > 0)
        {
          if (!bool) {
            if (i2 > 0) {
              return l.a(i1, i2);
            }
          }
          return -1;
        }
      }
      if (!bool) {
        if (i2 > 0) {
          return 1;
        }
      }
      int i3 = l.a(this.g[locald1.e().f()], this.g[locald2.e().f()]);
      if (!bool) {
        if (i3 != 0) {
          return i3;
        }
      }
      int i4 = l.a(this.a[i], this.a[j]);
      if (!bool) {
        if (i4 != 0) {
          return i4;
        }
      }
      int i5 = this.d[i];
      int i6 = this.d[j];
      if (!bool) {
        if (i5 > 0)
        {
          if (!bool) {
            if (i6 > 0) {
              return l.a(i5, i6);
            }
          }
          return -1;
        }
      }
      if (!bool) {
        if (i6 > 0) {
          return 1;
        }
      }
      return 0;
    }
  }
  
  static final class d_
    implements Comparator
  {
    final byte[] a;
    final byte[] b;
    final int[] d;
    final int[] e;
    final int[] g;
    
    d_(int[] paramArrayOfInt1, byte[] paramArrayOfByte1, int[] paramArrayOfInt2, byte[] paramArrayOfByte2, int[] paramArrayOfInt3)
    {
      this.g = paramArrayOfInt1;
      this.a = paramArrayOfByte1;
      this.b = paramArrayOfByte2;
      this.d = paramArrayOfInt2;
      this.e = paramArrayOfInt3;
    }
    
    public int compare(Object paramObject1, Object paramObject2)
    {
      boolean bool = d.R;
      a.c.d locald1 = (a.c.d)paramObject1;
      a.c.d locald2 = (a.c.d)paramObject2;
      int i;
      int k = this.a[(i = locald1.d())];
      int j;
      int m = this.a[(j = locald2.d())];
      int n = l.a(k, m);
      if (!bool) {
        if (n != 0) {
          return n;
        }
      }
      int i1 = this.d[i];
      int i2 = this.d[j];
      if (!bool) {
        if (i1 > 0)
        {
          if (!bool) {
            if (i2 > 0) {
              return l.a(i1, i2);
            }
          }
          return -1;
        }
      }
      if (!bool) {
        if (i2 > 0) {
          return 1;
        }
      }
      int i3 = l.a(this.g[locald1.f().f()], this.g[locald2.f().f()]);
      if (!bool) {
        if (i3 != 0) {
          return i3;
        }
      }
      int i4 = l.a(this.b[i], this.b[j]);
      if (!bool) {
        if (i4 != 0) {
          return i4;
        }
      }
      int i5 = this.e[i];
      int i6 = this.e[j];
      if (!bool) {
        if (i5 > 0)
        {
          if (!bool) {
            if (i6 > 0) {
              return l.a(i5, i6);
            }
          }
          return -1;
        }
      }
      if (!bool) {
        if (i6 > 0) {
          return 1;
        }
      }
      return 0;
    }
  }
  
  static final class f_
    implements Comparator
  {
    final float[] a;
    
    f_(float[] paramArrayOfFloat)
    {
      this.a = paramArrayOfFloat;
    }
    
    public int compare(Object paramObject1, Object paramObject2)
    {
      return l.a(this.a[((e)paramObject1).f()], this.a[((e)paramObject2).f()]);
    }
  }
}



/* Location:           E:\idea\

 * Qualified Name:     a.f.d.a.t

 * JD-Core Version:    0.7.0.1

 */